<template>
	<view class="container">
		<view>接口文件</view>
	</view>
</template>

<script>
export default {
	methods: {
		// 微信登录接口
		weixinLogin(){
			let param = {},_this = this;
			param.type = 'Wechat';
			let user_info = {};
			user_info.gender = 0;
			user_info.nickName = '微信用户';
			user_info.avatarUrl = configApi.appurlImg + '/appimg/avatar.png';
			param.user_info = user_info;
			uni.login({
				provider: 'weixin', //使用微信登录
				success: function (loginRes) {
					param.code = loginRes.code;
					console.log(loginRes.code);
					request.post({
						url: '/user.user/third',
						data: param
					}).then(res =>{
						console.log(res);
						uni.setStorageSync('userToken', res.data.token);
						// setTimeout(() => {
						// 	uni.navigateBack();
						// 	uni.$emit('htmlRefresh', {});
						// }, 600);
					})
				}
			});
		},
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	}
}
</script>
